#include<iostream>
#include"task.hpp"
#include"threadpool.hpp"
#include<unistd.h>



int main()
{
    ThreadPool<task>* tp = ThreadPool<task>::getInstance();
    tp->strart();
    while(true)
    {
        int x = rand() % 10;
        int y = rand() % 10;        
        char op = opers[rand() % opers.size()];

        task t(x,y,op);
        t.getTask();
        tp->push(t);
        sleep(1);
    }
    return 0;
}